package com.beerandjesus.blackjack.ui.awt;

import com.beerandjesus.blackjack.controller.GameController;
import com.beerandjesus.blackjack.event.GameEvents;

import java.util.Observable;

/**
 * User: reverend
 * Date: Jul 13, 2005
 * Time: 1:18:58 AM
 */
public class AbledObserverButton extends ObserverButton {

    public AbledObserverButton(String label, GameController controller) {
        super(label, controller);
    }

    public void update(Observable observable, Object o) {
        if (o.equals(GameEvents.ENABLE_BUTTONS)) {
            setEnabled(true);
        } else if (o.equals(GameEvents.DISABLE_BUTTONS)) {
            setEnabled(false);   
        }
    }
}
